package org.nanotek.lucene;

import org.apache.lucene.document.Document;
import org.nanotek.cms.domain.lucene.BaseDocument;

public abstract class  BaseDocumentBuilder implements LuceneDocumentBuilder<BaseDocument> {

	public BaseDocumentBuilder() {
	}

	@Override
	public abstract Document buildDocument(BaseDocument source);
//	{
//
//		Document document = new Document();
//		Field idField = new TextField("id", source.getId(), Field.Store.YES);
//		document.add(idField);
//		Field wordField = new TextField("content", source.getContent(), Field.Store.YES);
//		document.add(wordField);
//		Field referField = new TextField("referURL", source.getReferURL(), Field.Store.YES);
//		document.add(referField );
//		Field modifiedField = new LongField("modified" , new Date().getTime() , Field.Store.YES);
//		document.add(modifiedField);
//		return document;
//	}

}
